package com.jekun.helloworld.mideng;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RequestMapping("/user")
@RestController
public class UserController extends BaseController {

    // 缓存 ID 集合
    private Map<String, Integer> reqCache = new HashMap<>();

    @GetMapping("/add")
    public String addUser(String id) {
        // 业务代码...
        userList.put(no, id);
        String s = "添加第 " + no + " 个用户,工号为:" + id;
        no++;
        return s;
    }
}